		
		<select name="search_timefield">
			<option value="regdate" {:input('search_timefield')=='regdate'?'selected':''}>注册日期</option>
			<option value="lastvist" {:input('search_timefield')=='lastvist'?'selected':''}>最后登录</option>
		</select>
		<input type="text" placeholder='开始日期' value="{:input('search_begintime')}" class="search_begintime time" name="search_begintime">
		<input type="text" placeholder='结束日期' value="{:input('search_endtime')}" class="search_endtime time" name="search_endtime">
		<script>laydate.render({ elem: '.search_begintime',type: 'datetime'});</script>
		<script>laydate.render({ elem: '.search_endtime',type: 'datetime'});</script>
		
		
		<select name="search_bindphone">
			<option value="">手机</option>
			<option value="0" {:input('search_bindphone')==='0'?'selected':''}>未绑</option>
			<option value="1" {:input('search_bindphone')=='1'?'selected':''}>已绑</option>
		</select>
		<select name="search_bindidcard">
			<option value="">身份证</option>
			<option value="0" {:input('search_bindidcard')==='0'?'selected':''}>未验证</option>
			<option value="1" {:input('search_bindidcard')=='1'?'selected':''}>已验证</option>
		</select>
		<select name="search_bindwxmp">
			<option value="">公众号</option>
			<option value="0" {:input('search_bindwxmp')==='0'?'selected':''}>未关注</option>
			<option value="1" {:input('search_bindwxmp')=='1'?'selected':''}>已关注</option>
		</select>

		<select name="search_bindwxlogin">
			<option value="">微信登录</option>
			<option value="0" {:input('search_bindwxlogin')==='0'?'selected':''}>未绑定</option>
			<option value="1" {:input('search_bindwxlogin')=='1'?'selected':''}>已绑定</option>
		</select>

		<select name="search_bindqqlogin">
			<option value="">QQ登录</option>
			<option value="0" {:input('search_bindqqlogin')==='0'?'selected':''}>未绑定</option>
			<option value="1" {:input('search_bindqqlogin')=='1'?'selected':''}>已绑定</option>
		</select>

		<select name="search_sex">
			<option value="">性别</option>
			<option value="1" {:input('search_sex')=='1'?'selected':''}>先生</option>
			<option value="2" {:input('search_sex')=='2'?'selected':''}>女士</option>
		</select>

		<select name="search_groupid">
			<option value="">用户组</option>
			{volist name=":getGroupByid()" id="name"}
			<option value="{$key}" {:input('search_groupid')==$key?'selected':''}>{$name}</option>
			{/volist}
		</select>

		<select name="search_field">
			<option value="">选择字段</option>
			{if $tab_ext.id}
				<option value="{$tab_ext.id}" {:input('search_field')=='id'?'selected':''}>用户{$tab_ext.id}</option>
			{else /}
				<option value="id" {:input('search_field')=='id'?'selected':''}>{$tab_ext.id_name?:'ID'}</option>
			{/if}
			{volist name="$tab_ext.search" id="name"}
				<option value="{$key}" {:input('search_field')==$key?'selected':''}>{$name}</option> 
			{/volist}
		</select>
		<input type="text" placeholder='请输入关键字' value="{:input('keyword')}" class="search_word" name="search_word"> <input onclick="search_content()" type="button" name="" value="搜索" class="layui-btn layui-btn-sm">

<script type="text/javascript">
function search_content(){
	var field = $("select[name='search_field']").val();
	var keyword = $("input[name='search_word']").val();
	var search_fid = $("select[name='search_fid']").length>0 ? $("select[name='search_fid']").val() : '';
	var search_status = $("select[name='search_status']").length>0 ? $("select[name='search_status']").val() : '';
	var search_begintime = $("input[name='search_begintime']").length>0 ? $("input[name='search_begintime']").val() : '';
	var search_endtime = $("input[name='search_endtime']").length>0 ? $("input[name='search_endtime']").val() : '';

	var search_bindphone = $("select[name='search_bindphone']").length>0 ? $("select[name='search_bindphone']").val() : '';
	var search_bindwxmp = $("select[name='search_bindwxmp']").length>0 ? $("select[name='search_bindwxmp']").val() : '';
	var search_bindwxlogin = $("select[name='search_bindwxlogin']").length>0 ? $("select[name='search_bindwxlogin']").val() : '';
	var search_bindqqlogin = $("select[name='search_bindqqlogin']").length>0 ? $("select[name='search_bindqqlogin']").val() : '';
	var search_sex = $("select[name='search_sex']").length>0 ? $("select[name='search_sex']").val() : '';
	var search_groupid = $("select[name='search_groupid']").length>0 ? $("select[name='search_groupid']").val() : '';
	var search_bindidcard = $("select[name='search_bindidcard']").length>0 ? $("select[name='search_bindidcard']").val() : '';
	

	if(keyword!='' && field==''){
		layer.alert('请选择搜索字段类型');
		return ;
	}
	var url = location.href.indexOf('?')>0 ? location.href.substr(0,location.href.indexOf('?')) : location.href;
	url +='?search_field=' + field + '&keyword=' +keyword;
	
	if(search_begintime!=''){
		url +='&search_begintime=' + search_begintime;
	}
	if(search_endtime!=''){
		url +='&search_endtime=' + search_endtime;
	}
	if(search_begintime!=''||search_endtime!=''){
		url +='&search_timefield='+$("select[name='search_timefield']").val();
	}

	if(search_bindphone!==''){
		url +='&search_bindphone=' + search_bindphone;
	}
	if(search_bindwxmp!==''){
		url +='&search_bindwxmp=' + search_bindwxmp;
	}
	if(search_bindwxlogin!==''){
		url +='&search_bindwxlogin=' + search_bindwxlogin;
	}
	if(search_bindqqlogin!==''){
		url +='&search_bindqqlogin=' + search_bindqqlogin;
	}
	if(search_sex!==''){
		url +='&search_sex=' + search_sex;
	}
	if(search_groupid!==''){
		url +='&search_groupid=' + search_groupid;
	}
	if(search_bindidcard!==''){
		url +='&search_bindidcard=' + search_bindidcard;
	}

	window.location.href = url;
}
</script>